package com.imti.mall.feign.clients;

import com.imti.mall.common.Api.CommonPage;
import com.imti.mall.common.Api.CommonResult;
import com.imti.mall.model.order.pojo.OmsOrder;
import com.imti.mall.model.order.pojo.OmsOrderSetting;
import com.imti.mall.model.order.query.OmsOrderQuery;
import com.imti.mall.model.order.vo.OmsOrderDelivery;
import com.imti.mall.model.order.vo.OmsOrderDetail;
import com.imti.mall.model.order.vo.OmsOrderMoneyInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "imti-mall-order", contextId = "orders")
public interface OrderFeignClient {

    /**
     * 订单分页列表
     *
     * @return
     */
    @GetMapping("/api/v1/orders")
    public CommonResult<CommonPage<OmsOrder>> list(@RequestParam OmsOrderQuery omsOrderQuery,
        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    /**
     * 订单详情
     *
     * @return
     */
    @GetMapping("/api/v1/orders/{orderId}")
    public CommonResult<OmsOrderDetail> detail(@PathVariable Long orderId);

    /**
     * 删除订单
     *
     */
    @PostMapping("/api/v1/orders/deleteOrderByOrderId")
    public CommonResult deleteOrderByOrderId(Long ids[]);

//    /**
//     * 关闭订单
//     */
//    @PostMapping("/api/v1/orders/closeOrderById")
//    public CommonResult closeOrderById(Long ids[],String note);
//
//    /**
//     * 发货
//     */
//    @PostMapping("/api/v1/orders/deliveryOrder")
//    public CommonResult deliveryOrder(@RequestBody List<OmsOrderDelivery> list);
//
//
//    /**
//     * 修改收货人信息
//     */
//    @PostMapping("/api/v1/orders/updateReceiverInfo")
//    public CommonResult updateReceiverInfo(@RequestBody OmsOrderDelivery omsOrderDelivery);
//
//
//    /**
//     * 备注订单
//     */
//    @PostMapping("/api/v1/orders/updateOrderNote")
//    public CommonResult updateOrderNote(Long id,String note);
//
//
//    /**
//     * 修改费用信息
//     */
//    @PostMapping("/api/v1/orders/updateMoneyInfo")
//    public CommonResult updateMoneyInfo(@RequestBody OmsOrderMoneyInfo omsOrderMoneyInfo);
//
//
//    /**
//     * 获取设置
//     */
//    @GetMapping("/api/v1/orderSetting/getSetting")
//    public CommonResult<OmsOrderSetting> getSetting();
//
//    /**
//     * 订单设置
//     */
//    @PostMapping("/api/v1/orderSetting/setting")
//    public CommonResult setting(OmsOrderSetting omsOrderSetting);

}
